home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
SOUND
/
SNDSGOOD.ARJ
/
SNDSGOOD.DOC
< prev
next >
Wrap
Text File
|
1992-02-21
|
7KB
|
301 lines
*************************************************************************
* *
* Documentation for SoundsGood Version 2.0 *
* *
* Copyright (c) 1992 by Richard C. Leinecker *
* *
*************************************************************************
Sounds Good is a sound editor for the PC speaker. It lets you create,
edit, and play sounds that can be used in your programs. The sounds
that you create can be saved to disk and loaded in you program.
The Sounds Good archived file should contain the following files:
SG.EXE - the sound editor program
SG_C.H - an include file for C programs
C_EXMPL1.C - a C example program in small memory model
C_EXMPL2.C - a C example program in large memory model
B_EXMPLE.BAS - a QuickBASIC example program
SG_BASIC.LIB - the BASIC library
SG_CPAS.LIB - the C and Pascal library
SOUND01.SRC
SOUND01.SND
SOUND02.SRC
SOUND02.SND
SOUND03.SRC
SOUND03.SND
SOUND04.SRC
SOUND04.SND
SOUND05.SRC
SOUND05.SND
SOUND06.SRC
SOUND06.SND
SOUND07.SRC
SOUND07.SND
SOUND08.SRC
SOUND08.SND
SOUND09.SRC
SOUND09.SND
Along with the Sounds Good editor program is a set of library routines
that let you easily use the sounds you've created in your programs.
They are interrupt driven too, so after the sounds are started, you
can do other things.
This program is ShareWare. If you use it, you should register. If you
use the library routines in any program--PD, ShareWare, commercial, or
otherwise--you must register. You don't have permission to use the
library in your program except for personal use until you register.
Along with registration, I'll send you source code.
To register, send $15 to Richard C. Leinecker, P.O. Box 2567, Reidsville,
North Carolina 27323-2567.
PLAYING AND RECORDING
The easiest way to create tunes is to play them by pressing the correct
keys or clicking on the note buttons with the mouse. Notice toward the
lower left portion of the screen that there are notes and frequencies.
Each one has a keyboard key that you can press to play the note. You can
also click the left mouse button on any of the blocks to play the note.
When you play a note it's automatically inserted in the sound list. The
frequency and duration are placed according to the note you played and
the duration for which you played it.
You can change the frequency range to another octave by pressing the Tab key
of clicking the mouse button on the octave block (left button raises, right
lowers.)
INSERTING FUNCTIONS INTO THE LIST
You can edit any of the sounds in the list by pressing return on the sound
that's highlighted or clicking the right mouse button on it.
You can insert any of the functions into the sound list by clicking the
mouse on it or pressing Shift- and the key (usually a number) next to
the function.
PLAYING SOUNDS
Play the sounds by using the menus or pressing Ctrl-P. Stop the sounds by
using the menus or pressing Ctrl-S.
COPYING, CUTTING, AND PASTING
You can copy, cut, and paste any of the sounds in the list. Use the mouse
to highlight a block or use F1 to start and end a block. Then use the menu or
Ctrl-C to copy, Ctrl-X to cut, Ctrl-T to paste, and Ctrl-D to delete.
The Functions:
-Editible Sounds:
Tone [Frq] [Del]
Frq - Frequency in Hertz
Del - Delay in 1/18th seconds
Silence [Del]
Del - Delay in 1/18th seconds
Ascend [Frq] [Frq] [Del] [Cnt] [Step]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th seconds between steps
Cnt - Number of repeats
Step - Amount of increase
Descend [Frq] [Frq] [Del] [Cnt] [Step]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th seconds between steps
Cnt - Number of repeats
Step - Amount of decrease
Trill [Frq] [Frq] [Del] [Cnt]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th seconds between the interval
Cnt - Number of repeats
Interval [Frq] [Frq] [Del] [Cnt] [Step]
Frq - Starting frequency in Hertz
Frq - Ending frequency in Hertz
Del - Delay in 1/18th seconds between interval
Cnt - Number of repeats
Step - Amount of increase for each successive interval
On/Off [Frq] [Del] [Cnt]
Frq - Frequency in Hertz
Del - Delay in 1/18th seconds
Cnt - Number of repeats
-Predefined Sounds
Siren
Whistle
Alarm
Gun
Blast
Sound Frequencies:
Here is a partial list of some sound frequencies.
Note Frequency
C 131
D 147
E 165
F 175
G 196
A 220
B 247
C 262
D 294
E 330
F 349
G 392
A 440
B 494
C 523
D 587
E 659
F 698
G 784
A 880
B 988
C 1046
D 1175
E 1318
F 1397
G 1568
A 1760
B 1975
Programming:
First, make sure that your linker links in the appropriate library file.
-Installing the interrupt
You have to turn the interupt on before the sounds will play. At the
beginning of your progrgam (or at least before you begin any sounds)
make the following call.
BASIC
call installit
C
installit();
Pascal
call installit;
-Removing the interrupt
You have to remove the interrupt before exiting the program or the
computer will crash. Make the following call before exiting.
BASIC
call removeit
C
removeit();
Pascal
call removeit;
-Starting a sound
The sound routines update themselves and behave exactly as those in the
sound editor. You'll have to first load the sounds into the buffer.
BASIC
REM sound is already loaded
calls dosound( soundbuffer$ )
C
dosound( soundbuffer );
Pascal
dosound( soundbuffer );
-Finding out how many events remain
Use the following routine to determine how much of the sound remains
in the queue. Returns a value if there are events even if the sound is
paused.
BASIC
calls eventsleft( events% )
C
events = eventsleft();
Pascal
events = eventsleft;
-Finding out if there's a sound going on
This is different than the eventsleft call. It returns a non-zero if a
sound is being played and a zero if no sound is being played. If a sound
is paused, it will return a zero.
BASIC
calls soundsareon( soundflag% )
C
soundflag = soundsareon();
Pascal
soundflag = soundsareon;
-Pause the sound
BASIC
call pausesound
C
pausesound();
Pascal
pausesound;
-Unpause the sound
BASIC
call unpausesound
C
unpausesound();
Pascal
unpausesound;
You can leave me messages on CompuServe (user number [74676,457])
or GEnie (mail address R.LEINECKER).
For orders or inquiries use the included order form.